<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var num = [1,2,3,4,5,6,7,8,9,10];
			function getNum(num){
				var newArr = [];
				for(var i=0;i<2;i++){
					var rand = Math.floor(Math.random()*num.length);
					newArr.push(num[rand]);
					num.splice(rand,1);
				}
				return newArr;
			}
			
			console.log(getNum(num));
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
		</script>
	</body>
</html>
